/*
	Title: 01_Figure4.do
	Paper: Brauning, Ivashina, Ozdagli (2025)
	Description: Figure 4 - Assessing potential manipulation at covenant threshold 
*/

/*------------------------------------------------------------------------------
								  Figure 4	
------------------------------------------------------------------------------*/
// Import Figure 4 data 
use "$data_path/Figure4.dta", clear 

// Label Variables  


// Create Figure 3A: Maintenance 
rddensity DD_Total, plot ///
		  graph_opt(graphregion(color(white)) ///
		  ylabel(0(0.1)0.4) ///
		  xtitle(" " "Distance to (maintenance) covenant threshold") ///
		  ytitle("Density") ///
		  legend(off) ///
		  name(Figure4A, replace))
		  
graph export "$figures_path/Figure4A.png", replace 


// Create Figure 3B: Incurrence 
rddensity IDD_Total, plot ///
		  graph_opt(graphregion(color(white)) ///
		  ylabel(0(0.1)0.4) ///
		  ylabel(0(0.1)0.4) ///
		  xtitle(" " "Distance to (incurrence) covenant threshold") ///
		  ytitle("Density") ///
		  legend(off) ///
		  name(Figure4B, replace))
		  
graph export "$figures_path/Figure4B.png", replace 		  